var Util = {};
Util.str = {
    len:function (str) {
        var realLength = 0, len = str.length, charCode = -1;
        for (var i = 0; i < len; i++) {
            charCode = str.charCodeAt(i);
            if (charCode >= 0 && charCode <= 128)
                realLength += 1;
            else
                realLength += 2;
        }
        return realLength;
    }
};
Util.regex = {
      mobile:function (number) {
          if(!(/^1[3456789]\d{9}$/.test(number))){
              return false;
          }
          return true;
      },
      tel:function (number) {
          if(!/^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/.test(number)){
              alert('固定电话有误，请重填');
              return false;
          }
          return true;
      }
};